home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
UTILITY
/
TASEXAM6.ARJ
/
50MAPCT.TAS
next >
Wrap
Text File
|
1991-12-22
|
1KB
|
33 lines
{50mapct.tas}
{This scripts sorts on the closing price being within a specified band
of the 50 day moving average}
#OUTPUT_FILE 'LPT1'
IF first_ticker
begin
write(' Recent 50 Day Recent :50Day 200Day: -- Volume ')
;
writeln(' --');
write(' Change Ticker Pct Dif Close :MovAvg Price: Recent 50Mov')
;
writeln(' PctChg');
end
{Calculate 50 day price average}
PMOV50:=MOV(C,50,'S');
{Calculate Change in Close}
CL:=c[0]-c[-1]
{Calculate 50 day average of Volume,200 day average of price and price and
volume percent change}
VMOV50:=MOV(V,50,'S');
PMOV200:=MOV(C,200,'S');
PPCT:=(c-pmov50)/pmov50*100
VOLP:=(v-vmov50)/vmov50*100
{Change values here to effect sort criteria}
if ppct<2.0 and ppct >-1.5 and PMOV50>0 AND VOLP <25
sortout(CL,TICKER,PPCT,C[0],pmov50,PMOV200,v[0],VMOV50,volp);
if last_ticker
begin
sorton(3,'d')
sortget(v1,v2,v3,v4,v5,v6,v7,v8,V9)
sortprint('%7.2f %s %6.2f %6.2f %6.2f %7.2f %6.0f %6.0f %6.1f\n')
end